<?php
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition End User License Agreement
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magento.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license http://www.magento.com/license/enterprise-edition
 */
/** @var $this Enterprise_Rma_Block_Adminhtml_Rma_Edit_Tab_General_History" */
?>
<div class="entry-edit" id="rma-history-block">
    <div class="entry-edit-head">
        <h4 class="icon-head head-shipping-method"><?php echo Mage::helper('enterprise_rma')->__('RMA History') ?></h4>
    </div>
    <div class="fieldset">
        <div id="history_form" class="rma-history-form">
            <span class="field-row">
                <label class="normal" for="history_comment"><?php echo Mage::helper('enterprise_rma')->__('Comment Text') ?></label>
                <textarea name="comment[comment]" rows="3" cols="5" style="height:6em; width:99%;" id="history_comment"></textarea>
            </span>
            <div class="f-left">
                <?php if ($this->canSendCommentEmail()): ?>
                    <input name="comment[is_customer_notified]" type="checkbox" id="history_notify" value="1" />
                    <label class="normal" for="history_notify"><?php echo Mage::helper('enterprise_rma')->__('Notify Customer by Email') ?></label><br />
                <?php endif; ?>
                <input name="comment[is_visible_on_front]" type="checkbox" id="history_visible" value="1" /><label class="normal" for="history_visible"> <?php echo Mage::helper('enterprise_rma')->__('Visible on Frontend') ?></label>
            </div>
            <div class="f-right">
                <?php echo $this->getChildHtml('submit_button') ?>
            </div>
            <div class="clear"></div>
            <?php if($this->getComments()): ?>
                <ul class="note-list">
                <?php foreach ($this->getComments() as $_item): ?>
                    <li>
                        <strong><?php echo $this->helper('core')->formatDate($_item->getCreatedAt(), 'medium') ?></strong>
                        <strong><?php echo $this->helper('core')->formatTime($_item->getCreatedAt(), 'medium') ?></strong>
                        <span class="separator">|</span>
                        <strong>
                            <?php if ($_item->getIsAdmin()): ?>
                                <?php echo $this->__('Customer Service')?>
                            <?php else: ?>
                                <?php echo $this->escapeHtml($this->getCustomerName())?>
                            <?php endif; ?>
                        </strong><br/>
                        <small><?php echo $this->helper('enterprise_rma')->__('Customer') ?>
                        <strong class="subdue">
                            <?php if ($_item->getIsCustomerNotified()): ?>
                            <?php echo $this->helper('enterprise_rma')->__('Notified') ?>
                            <img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" />
                            <?php else: ?>
                            <?php echo $this->helper('enterprise_rma')->__('Not Notified') ?>
                            <?php endif; ?>
                        </strong></small>
                        <?php if ($_item->getComment()): ?>
                            <br/><?php echo $this->escapeHtml($_item->getComment(), array('b','br','strong','i','u')) ?>
                        <?php endif; ?>
                    </li>
                <?php endforeach; ?>
                </ul>
            <?php endif ?>
        </div>
    </div>
</div>
